package com.atguigu.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
/**
 * @JsonField 注解，可以对要序列化的字段，进行自定义效果
 */
public class Student {

    private Integer id;
    @JSONField(name = "myNames")//该字段序列化后的名字
    private String name;
    @JSONField(serialize = false)
    private Integer age;
    private String address;
    //@JSONField(ordinal = 3) //该字段序列化后的顺序
    @JSONField(serialize = false)//不序列化该字段
    private String email;
}
